# Contributor: Marten Ringwelski <git+alpine@maringuu.de>
# Contributor: Steven Guikal <apk-void@fluix.one>
# Maintainer: Marten Ringwelski <git+alpine@maringuu.de>
pkgname=py3-starlette
pkgver=0.30.0
pkgrel=1
pkgdesc="Lightweight ASGI framework/toolkit, which is ideal for building async web services in Python"
url="https://github.com/encode/starlette"
arch="noarch"
license="MIT"
depends="
	py3-anyio
	"
makedepends="
	py3-gpep517
	py3-hatchling
	py3-installer
	"
checkdepends="
	py3-httpx
	py3-itsdangerous
	py3-jinja2
	py3-pytest-forked
	py3-pytest-xdist
	py3-python-multipart
	py3-trio
	py3-typing-extensions
	py3-yaml
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/encode/starlette/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/starlette-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m pytest -n auto --forked
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/starlette*.whl
}

sha512sums="
751077fcfe3d344584d8986f3fc2bc25208716ca215db8ce62dfc752008dacd95f4834367f0921ceacaafa6b20409a9912f49ceabc23d7e9e5f636c6fb3646b2  py3-starlette-0.30.0.tar.gz
"
